<?php

namespace app\admin\validate;

use think\Validate;

class User extends Validate
{
    protected $rule = [
        'name' => 'require|unique:user|max:25'
    ];

    protected $message = [
        'name.require' => '企业名称不能为空',
        'name.unique' => '企业名称已存在',
    ];

    // public function sceneAdd()
    // {
    //     return $this->only(['username', 'password'])->append('username', 'require|length:2,25|token');
    // }
    // public function sceneEdit()
    // {
    //     return $this->only(['username'])->append('username', 'require|length:2,25|token');
    // }

}